package com.gateway.loadBalance;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Huangkai
 */
@NoArgsConstructor
@Data
public class Invoker {

    /**
     * 地址
     */
    private String address;
    /**
     * 权重
     */
    private Integer weight = 1;

    /**
     * 当前权重
     * */
    private Integer currentWeight = 0;

    public Invoker(String address) {
        this.address = address;
    }

    public Invoker(String address, int weight) {
        this.address = address;
        this.weight = weight;
    }
}